﻿using System;

namespace jQueryLib
{
    partial class JQueryInstance
    {
        /// <summary>
        /// Hide the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Hide();

        /// <summary>
        /// Hide the matched elements.
        /// </summary>
        /// <param name="milliseconds"></param>
        /// <returns></returns>
        public abstract JQueryInstance Hide(int duration);

        /// <summary>
        /// Hide the matched elements.
        /// </summary>
        /// <param name="milliseconds"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition. "swing" or "linear" or other plugin</param>
        /// <returns></returns>
        public abstract JQueryInstance Hide(int duration, string easing);

        /// <summary>
        /// Hide the matched elements.
        /// </summary>
        /// <param name="milliseconds"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Hide(int duration, Action callback);

        /// <summary>
        /// Hide the matched elements.
        /// </summary>
        /// <param name="milliseconds"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition. "swing" or "linear" or other plugin</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Hide(int duration, string easing, Action callback);

        /// <summary>
        /// Display the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Show();

        /// <summary>
        /// Display the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance Show(int duration);

        /// <summary>
        /// Display the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition. "swing" or "linear" or other plugin</param>
        /// <returns></returns>
        public abstract JQueryInstance Show(int duration, string easing);

        /// <summary>
        /// Display the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Show(int duration, Action callback);

        /// <summary>
        /// Display the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition. "swing" or "linear" or other plugin</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Show(int duration, string easing, Action callback);

        /// <summary>
        /// Display or hide the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Toggle();

        /// <summary>
        /// Display or hide the matched elements.
        /// </summary>
        /// <param name="show"></param>
        /// <returns></returns>
        public abstract JQueryInstance Toggle(bool show);

        /// <summary>
        /// Display or hide the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Toggle(int duration, Action callback);

        /// <summary>
        /// Display or hide the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition. "swing" or "linear" or other plugin</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Toggle(int duration, string easing, Action callback);

        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        /// <param name="properties">A map of CSS properties that the animation will move toward.</param>
        /// <returns></returns>
        public abstract JQueryInstance Animate(object properties);

        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        /// <param name="properties">A map of CSS properties that the animation will move toward.</param>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance Animate(object properties, int duration);

        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        /// <param name="properties">A map of CSS properties that the animation will move toward.</param>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance Animate(object properties, int duration, string easing);

        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        /// <param name="properties">A map of CSS properties that the animation will move toward.</param>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance Animate(object properties, int duration, string easing, Action callback);

        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        /// <param name="properties">A map of CSS properties that the animation will move toward.</param>
        /// <param name="options">A map of additional options to pass to the method. Supported keys:
        /// <para>duration: A string or number determining how long the animation will run.</para>
        /// <para>easing: A string indicating which easing function to use for the transition.</para>
        /// <para>complete: A function to call once the animation is complete.</para>
        /// <para>step: A function to be called after each step of the animation.</para>
        /// <para>queue: A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string.</para>
        /// <para>specialEasing: A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions (added 1.4).</para>
        /// </param>
        /// <returns></returns>
        public abstract JQueryInstance Animate(object properties, object options);

        /// <summary>
        /// Set a timer to delay execution of subsequent items in the queue.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance Delay(int duration);

        /// <summary>
        /// Set a timer to delay execution of subsequent items in the queue.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="queueName">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>
        /// <returns></returns>
        public abstract JQueryInstance Delay(int duration, string queueName);

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Stop();

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        /// <param name="clearQueue">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>
        /// <returns></returns>
        public abstract JQueryInstance Stop(bool clearQueue);

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        /// <param name="clearQueue">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>
        /// <param name="jumpToEnd">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>
        /// <returns></returns>
        public abstract JQueryInstance Stop(bool clearQueue, bool jumpToEnd);

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        /// <param name="queueName">The name of the queue in which to stop animations.</param>
        /// <param name="clearQueue">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>
        /// <returns></returns>
        public abstract JQueryInstance Stop(string queueName, bool clearQueue);

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        /// <param name="queueName">The name of the queue in which to stop animations.</param>
        /// <param name="clearQueue">A Boolean indicating whether to remove queued animation as well. Defaults to false.</param>
        /// <param name="jumpToEnd">A Boolean indicating whether to complete the current animation immediately. Defaults to false.</param>
        /// <returns></returns>
        public abstract JQueryInstance Stop(string queueName, bool clearQueue, bool jumpToEnd);

        /// <summary>
        /// Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Finish();

        /// <summary>
        /// Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
        /// </summary>
        /// <param name="queueName">The name of the queue in which to stop animations.</param>
        /// <returns></returns>
        public abstract JQueryInstance Finish(string queueName);

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance SlideDown();

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance SlideDown(int duration);

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideDown(int duration, Action callback);

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideDown(int duration, string easing);

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideDown(int duration, string easing, Action callback);

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance SlideUp();

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance SlideUp(int duration);

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideUp(int duration, Action callback);

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideUp(int duration, string easing);

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideUp(int duration, string easing, Action callback);

        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance SlideToggle();

        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance SlideToggle(int duration);

        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideToggle(int duration, string easing);

        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideToggle(int duration, Action callback);

        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance SlideToggle(int duration, string easing, Action callback);

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance FadeIn();

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance FadeIn(int duration);

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeIn(int duration, string easing);

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeIn(int duration, Action callback);

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeIn(int duration, string easing, Action callback);

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance FadeOut();

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance FadeOut(int duration);

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeOut(int duration, string easing);

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeOut(int duration, Action callback);

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeOut(int duration, string easing, Action callback);

        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="opacity">A number between 0 and 1 denoting the target opacity.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeTo(int duration, float opacity);

        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="opacity">A number between 0 and 1 denoting the target opacity.</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeTo(int duration, float opacity, Action callback);

        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="opacity">A number between 0 and 1 denoting the target opacity.</param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeTo(int duration, float opacity, string easing, Action callback);

        /// <summary>
        /// Display or hide the matched elements by animating their opacity.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance FadeToggle();

        /// <summary>
        /// Display or hide the matched elements by animating their opacity.
        /// </summary>
        /// <param name="duration"></param>
        /// <returns></returns>
        public abstract JQueryInstance FadeToggle(int duration);

        /// <summary>
        /// Display or hide the matched elements by animating their opacity.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeToggle(int duration, string easing);

        /// <summary>
        /// Display or hide the matched elements by animating their opacity.
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="easing">A string indicating which easing function to use for the transition."swing" or "linear" or other plug-in</param>
        /// <param name="callback">A function to call once the animation is complete.</param>
        /// <returns></returns>
        public abstract JQueryInstance FadeToggle(int duration, string easing, Action callback);
    }

    public class Fx
    {
        /// <summary>
        /// The rate (in milliseconds) at which animations fire.
        /// </summary>
        public int interval;
        /// <summary>
        /// Globally disable all animations.
        /// </summary>
        public bool off;
    }

    partial class JQuery
    {
        public static Fx Fx;
    }
}
